/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.magri.mvc.persistence;

import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.magri.modulo2.agenda.dao.CidadeDAO;

/**
 *
 * @author Magri
 */
public class DBUtil {
    
    
    public static void close(ResultSet rs, PreparedStatement ps) {
        if (rs != null) {
            try {
                rs.close();
            } catch (SQLException ex) {
                Logger.getLogger(CidadeDAO.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if (ps != null) {
            try {
                ps.close();
            } catch (SQLException ex) {
                Logger.getLogger(CidadeDAO.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        
    }
}
